package com.xubao.ali.dao;

import org.njbdqn.ali.database.SqlTemplate;

import com.xubao.ali.entity.State;

public class StateDAO {
	private SqlTemplate template;
	
	public StateDAO() {
		template = new SqlTemplate();
	}
	
	public State findById(int id) {
		String sql = "select * from state where state_id = ?";
		return (State)template.resultToArray(sql, new Object[] {id}, State.class).get(0);
	}
}
